<template>


<div style="margin-bottom: 10px;">

        <Row>

            <Col span="12" class="flex" style="align-items: center !important;">
            <Checkbox @on-change="checkall(item)" size="20" v-model="item.checked" ></Checkbox>
            <Icon type="ios-link" />
            <div class="flex" style="margin-right: 10px;">
                <small>
                    {{item.name}}
                </small>
            </div>
            <Button type="primary" style="margin-right: 10px;" @click="share(item)" icon="ios-share">分享</Button>
            <Button type="primary" style="margin-right: 10px;" icon="ios-cloud-download" @click="download(item)">下载</Button>
            <Dropdown>
                <Button type="primary" style="margin-right: 10px;" icon="ios-more">更多</Button>
                <template #list>
                    <DropdownMenu>
                        <DropdownItem @click="cmm(item)">重命名</DropdownItem>
                        <DropdownItem @click="yulan(item)" v-if="item.ext == 'image' || item.ext == 'video'">预览</DropdownItem>
                        <DropdownItem @click="shanchu(item)">删除</DropdownItem>
                    </DropdownMenu>
                </template>
            </Dropdown>
            </Col>

            <Col span="6" class="flex" style="align-items: center !important;">--</Col>
            <Col span="6" class="flex" style="align-items: center !important;"> <small>{{(new Date(item.created_time)).toLocaleString()}}</small></Col>

        </Row>
    </div>

</template>
<script setup>
import { defineProps } from 'vue'
 
 const props = defineProps({
   item: Object,
   shanchu:Function,
   checkall:Function,
   yulan:Function,
   download:Function,
   share:Function,
   cmm:Function
 })

</script>